﻿using System;

using advadev.DataStorage;


namespace GenericDataStorageDemo.WPF
{

    /// <summary>
    /// Represents a user
    /// </summary>
    public class User : IGenericObject
    {

        /// <summary>
        /// Initializes a new instance of the User class
        /// </summary>
        public User()
        {
            // NOTE: default constructor necessary for deserialization
        }

        /// <summary>
        /// Initializes a new instance of the User class by the given parameter
        /// </summary>
        /// <param name="id">
        /// Id
        /// </param>
        /// <param name="name">
        /// Name
        /// </param>
        public User(string id, string name)
        {
            Id = id;
            Name = name;
        }

        /// <summary>
        /// Gets or sets the id
        /// </summary>
        public string Id
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the name
        /// </summary>
        public string Name
        {
            get;
            set;
        }

        #region IGenericObject implementation
        string IGenericObject.GenericObjectId
        {
            get
            {
                return Id.ToString();
            }
        }
        #endregion IGenericObject implementation

    }

}
